#include <pf_components.hpp>
Public Member Functions | |
PFBus (void) | |
~PFBus (void) | |
bool | matrixDiagSize (int *isize, int *jsize) const |
bool | matrixDiagValues (ComplexType *values) |
bool | matrixDiagValues (RealType *values) |
bool | vectorSize (int *isize) const |
bool | vectorValues (ComplexType *values) |
bool | vectorValues (RealType *values) |
void | setValues (gridpack::ComplexType *values) |
void | setValues (gridpack::RealType *values) |
int | getXCBufSize (void) |
void | setXCBuf (void *buf) |
void | setYBus (void) |
gridpack::ComplexType | getYBus (void) |
void | load (const boost::shared_ptr< gridpack::component::DataCollection > &data) |
void | setMode (int mode) |
void | resetVoltage (void) |
void | setVoltageLimits (double vmin, double vmax) |
bool | checkVoltageViolation (void) |
double | getVoltage (void) |
ComplexType | getComplexVoltage (void) |
double | getPhase (void) |
bool | getGenStatus (std::string gen_id) |
std::vector< std::string > | getGenerators () |
std::vector< std::string > | getLoads () |
bool | isPV (void) |
void | setVoltage (void) |
void | setPhase (void) |
void | setGenStatus (std::string gen_id, bool status) |
void | setIsPV (int status) |
void | resetIsPV () |
void | setSBus (void) |
bool | serialWrite (char *string, const int bufsize, const char *signal=NULL) |
bool | chkQlim (void) |
void | clearQlim () |
void | saveData (boost::shared_ptr< gridpack::component::DataCollection > data) |
void | setParam (std::string name, int busID, std::string genID, double value) |
void | setParam (int busID, std::string genID, double value) |
void | getParam (std::string &name, double *value, int idx) |
void | getParam (std::string &name, int *value, int idx) |
int | getElementIndex (std::string &name, std::string &tag) |
void | setIgnore (bool flag) |
bool | getIgnore () |
int | getArea () |
int | getZone () |
int | diagonalJacobianValues (double *rvals) |
int | rhsValues (double *rvals) |
void | pushIsPV () |
std::vector< double > | getGeneratorParticipation () |
void | setGeneratorRealPower (std::string tag, double value, gridpack::component::DataCollection *data) |
void | scaleGeneratorRealPower (std::string tag, double value) |
void | setLoadRealPower (std::string tag, double value, gridpack::component::DataCollection *data) |
void | scaleLoadPower (std::string tag, double value) |
void | resetPower () |
void | getGeneratorMargins (std::vector< std::string > &tag, std::vector< double > ¤t, std::vector< double > &pmin, std::vector< double > &pmax, std::vector< int > &status) |
void | getLoadPower (std::vector< std::string > &tag, std::vector< double > &pl, std::vector< double > &ql, std::vector< int > &status) |
void | setSource (bool flag) |
void | setSink (bool flag) |
void | setScale (double scale) |
gridpack::powerflow::PFBus::PFBus | ( | void | ) |
Simple constructor
gridpack::powerflow::PFBus::~PFBus | ( | void | ) |
Simple destructor
bool gridpack::powerflow::PFBus::checkVoltageViolation | ( | void | ) |
Check voltage for violation
bool gridpack::powerflow::PFBus::chkQlim | ( | void | ) |
chkQlim check QLIM violations
void gridpack::powerflow::PFBus::clearQlim | ( | ) |
Clear changes that were made for Q limit violations and reset bus to its original state
int gridpack::powerflow::PFBus::diagonalJacobianValues | ( | double * | rvals | ) |
Evaluate diagonal block of Jacobian for power flow calculation and return result as an array of real values
rvals | values of Jacobian block |
int gridpack::powerflow::PFBus::getArea | ( | ) |
Get area parameter for bus
ComplexType gridpack::powerflow::PFBus::getComplexVoltage | ( | void | ) |
Return the complex voltage on this bus
int gridpack::powerflow::PFBus::getElementIndex | ( | std::string & | name, | |
std::string & | tag | |||
) |
Get index of internal bus element based on character string identifier
name | character string describing element | |
tag | character string specifying bus element |
void gridpack::powerflow::PFBus::getGeneratorMargins | ( | std::vector< std::string > & | tag, | |
std::vector< double > & | current, | |||
std::vector< double > & | pmin, | |||
std::vector< double > & | pmax, | |||
std::vector< int > & | status | |||
) |
Get available margin for generator
tag | character ID for generator | |
current | initial generation | |
pmin | minimum allowable generation | |
pmax | maximum allowable generation | |
status | current status of generator |
std::vector<double> gridpack::powerflow::PFBus::getGeneratorParticipation | ( | ) |
Get vector containing generator participation
std::vector<std::string> gridpack::powerflow::PFBus::getGenerators | ( | ) |
Get list of generator IDs
bool gridpack::powerflow::PFBus::getGenStatus | ( | std::string | gen_id | ) |
Get generator status
gen_id | generator ID |
bool gridpack::powerflow::PFBus::getIgnore | ( | ) |
Get parameter to ignore voltage violations
void gridpack::powerflow::PFBus::getLoadPower | ( | std::vector< std::string > & | tag, | |
std::vector< double > & | pl, | |||
std::vector< double > & | ql, | |||
std::vector< int > & | status | |||
) |
Get current value of loads
tag | character ID for load | |
pl | initial value of load real power | |
ql | initial value of load reactive power | |
status | current status of load |
std::vector<std::string> gridpack::powerflow::PFBus::getLoads | ( | ) |
Get list of load IDs
void gridpack::powerflow::PFBus::getParam | ( | std::string & | name, | |
int * | value, | |||
int | idx | |||
) |
void gridpack::powerflow::PFBus::getParam | ( | std::string & | name, | |
double * | value, | |||
int | idx | |||
) |
Access parameters inside the bus module. This is designed to be extensible
name | character string describing parameter to be accessed | |
value | value of parameter | |
idx | index (if necessary) of variable to be accessed |
double gridpack::powerflow::PFBus::getPhase | ( | void | ) |
Return the value of the phase angle on this bus
double gridpack::powerflow::PFBus::getVoltage | ( | void | ) |
Return the value of the voltage magnitude on this bus
int gridpack::powerflow::PFBus::getXCBufSize | ( | void | ) | [virtual] |
Return the size of the buffer used in data exchanges on the network. For this problem, the voltage magnitude and phase angle need to be exchanged
Reimplemented from gridpack::component::BaseComponent.
gridpack::ComplexType gridpack::powerflow::PFBus::getYBus | ( | void | ) |
Get values of YBus matrix. These can then be used in subsequent calculations
Reimplemented from gridpack::ymatrix::YMBus.
int gridpack::powerflow::PFBus::getZone | ( | ) |
Get zone parameter for bus
bool gridpack::powerflow::PFBus::isPV | ( | void | ) |
Return whether or not the bus is a PV bus (V held fixed in powerflow equations)
void gridpack::powerflow::PFBus::load | ( | const boost::shared_ptr< gridpack::component::DataCollection > & | data | ) | [virtual] |
Load values stored in DataCollection object into PFBus object. The DataCollection object will have been filled when the network was created from an external configuration file
data,: | DataCollection object contain parameters relevant to this bus that were read in when network was initialized |
Reimplemented from gridpack::ymatrix::YMBus.
bool gridpack::powerflow::PFBus::matrixDiagSize | ( | int * | isize, | |
int * | jsize | |||
) | const [virtual] |
Return size of matrix block on the diagonal contributed by component
isize,jsize,: | number of rows and columns of matrix block |
Reimplemented from gridpack::ymatrix::YMBus.
bool gridpack::powerflow::PFBus::matrixDiagValues | ( | RealType * | values | ) | [virtual] |
Reimplemented from gridpack::component::MatVecInterface.
bool gridpack::powerflow::PFBus::matrixDiagValues | ( | ComplexType * | values | ) | [virtual] |
Return the values of for a diagonal matrix block. The values are returned in row-major order
values,: | pointer to matrix block values |
Reimplemented from gridpack::ymatrix::YMBus.
void gridpack::powerflow::PFBus::pushIsPV | ( | ) |
Push p_isPV values from exchange buffer to p_isPV variable
void gridpack::powerflow::PFBus::resetIsPV | ( | ) |
Reset isPV status
void gridpack::powerflow::PFBus::resetPower | ( | ) |
Reset power for generators and loads back to original values
void gridpack::powerflow::PFBus::resetVoltage | ( | void | ) |
Reset voltage and phase angle to initial values
int gridpack::powerflow::PFBus::rhsValues | ( | double * | rvals | ) |
Evaluate RHS values for powerflow equation and return result as an array of real values
rvals | values of Jacobian block |
void gridpack::powerflow::PFBus::saveData | ( | boost::shared_ptr< gridpack::component::DataCollection > | data | ) | [virtual] |
Save state variables inside the component to a DataCollection object. This can be used as a way of moving data in a way that is useful for creating output or for copying state data from one network to another.
data | data collection object into which new values are inserted |
Reimplemented from gridpack::component::BaseComponent.
void gridpack::powerflow::PFBus::scaleGeneratorRealPower | ( | std::string | tag, | |
double | value | |||
) |
Scale value of real power on all generators
character | ID for generator | |
value | scale factor for real power |
void gridpack::powerflow::PFBus::scaleLoadPower | ( | std::string | tag, | |
double | value | |||
) |
Scale value of real and reactive power on loads
character | ID for load | |
value | scale factor for real power |
bool gridpack::powerflow::PFBus::serialWrite | ( | char * | string, | |
const int | bufsize, | |||
const char * | signal = NULL | |||
) | [virtual] |
Update pg of specified bus element based on their genID
busID | ||
genID | ||
value | Write output from buses to standard out | |
string | (output) string with information to be printed out | |
signal | an optional character string to signal to this | |
bufsize | size of string buffer in bytes routine what about kind of information to write |
Reimplemented from gridpack::component::BaseComponent.
void gridpack::powerflow::PFBus::setGeneratorRealPower | ( | std::string | tag, | |
double | value, | |||
gridpack::component::DataCollection * | data | |||
) |
Set value of real power on individual generators
tag | generator ID | |
value | new value of generator real power | |
data | data collection object associated with bus |
void gridpack::powerflow::PFBus::setGenStatus | ( | std::string | gen_id, | |
bool | status | |||
) |
Set generator status
gen_id | generator ID | |
status | generator status |
void gridpack::powerflow::PFBus::setIgnore | ( | bool | flag | ) |
Set parameter to ignore voltage violations
flag | value of ignore parameter |
void gridpack::powerflow::PFBus::setIsPV | ( | int | status | ) |
Set isPV status
status | isPV status |
void gridpack::powerflow::PFBus::setLoadRealPower | ( | std::string | tag, | |
double | value, | |||
gridpack::component::DataCollection * | data | |||
) |
Set value of real power on individual loads
tag | load ID | |
value | new value of load real power | |
data | data collection object associated with bus |
void gridpack::powerflow::PFBus::setMode | ( | int | mode | ) | [virtual] |
Set the mode to control what matrices and vectors are built when using the mapper
mode,: | enumerated constant for different modes |
Reimplemented from gridpack::ymatrix::YMBus.
void gridpack::powerflow::PFBus::setParam | ( | int | busID, | |
std::string | genID, | |||
double | value | |||
) |
void gridpack::powerflow::PFBus::setParam | ( | std::string | name, | |
int | busID, | |||
std::string | genID, | |||
double | value | |||
) |
Modify parameters inside the bus module. This is designed to be extensible
name | character string describing parameter to be modified | |
value | new value of parameter | |
idx | index (if necessary) of variable to be modified |
void gridpack::powerflow::PFBus::setPhase | ( | void | ) |
Set phase angle value
void gridpack::powerflow::PFBus::setSBus | ( | void | ) |
setSBus BUS = (CG*(GEN(ON,PG) + J*GEN(ON,QG)-(PD+J*QD))/BASEMVA
void gridpack::powerflow::PFBus::setScale | ( | double | scale | ) |
Store scale factor
scale | factor for scaling generation or loads |
void gridpack::powerflow::PFBus::setSink | ( | bool | flag | ) |
Label bus as a sink for real time path rating
flag | identify bus as sink |
void gridpack::powerflow::PFBus::setSource | ( | bool | flag | ) |
Label bus as a source for real time path rating
flag | identify bus as source |
void gridpack::powerflow::PFBus::setValues | ( | gridpack::RealType * | values | ) | [virtual] |
Reimplemented from gridpack::component::MatVecInterface.
void gridpack::powerflow::PFBus::setValues | ( | gridpack::ComplexType * | values | ) | [virtual] |
Set the internal values of the voltage magnitude and phase angle. Need this function to push values from vectors back onto buses
values | array containing voltage magnitude and angle |
Reimplemented from gridpack::component::MatVecInterface.
void gridpack::powerflow::PFBus::setVoltage | ( | void | ) |
Set voltage value
void gridpack::powerflow::PFBus::setVoltageLimits | ( | double | vmin, | |
double | vmax | |||
) |
Set voltage limits on bus
vmin | lower value of voltage | |
vmax | upper value of voltage |
void gridpack::powerflow::PFBus::setXCBuf | ( | void * | buf | ) | [virtual] |
Assign pointers for voltage magnitude and phase angle
Reimplemented from gridpack::component::BaseComponent.
void gridpack::powerflow::PFBus::setYBus | ( | void | ) |
Set values of YBus matrix. These can then be used in subsequent calculations
Reimplemented from gridpack::ymatrix::YMBus.
bool gridpack::powerflow::PFBus::vectorSize | ( | int * | isize | ) | const [virtual] |
Return size of vector block contributed by component
isize,: | number of vector elements |
Reimplemented from gridpack::component::MatVecInterface.
bool gridpack::powerflow::PFBus::vectorValues | ( | RealType * | values | ) | [virtual] |
Reimplemented from gridpack::component::MatVecInterface.
bool gridpack::powerflow::PFBus::vectorValues | ( | ComplexType * | values | ) | [virtual] |
Return the values of the vector block
values,: | pointer to vector values |
Reimplemented from gridpack::component::MatVecInterface.